<?php
if (LZ_MODULE != 'index') die('Access Denied');
$user = $_SESSION['user'];
$action = $_GET['action'];

if (!$action || $action == 'menu')
{
	$view_data['title'] = $config['phpdisk_title'];
	$view_data['username'] = $_SESSION['login_user']['email'];
	if ($_SESSION['login_user']['status'] != 'admin')
	{
	}
	else
	{
		$view_data['company'] = array();
		$view_data['customer'] = array();
	}
	define('ROOT',$customer['name']);
	if ($user['root'] && is_dir($user['root']))
	{
		$size = get_folder_size($user['root']);

		$view_data['customer_total_size'] = dealsize(size_to_byte($config['default_customer_size']));
		$view_data['used_percentage'] = ceil(($size*10000)/(size_to_byte($config['default_customer_size'])))/100;
		$view_data['used_size'] = dealsize($size);
	}
}
?>